#ifndef _FILE_H_
#define _FILE_H_

#include <QObject>
#include <QDateTime>

class QByteArray;

namespace Tubox {

class File {
public:
	File() {}
	File(const QString& name, const QString& path,
			 unsigned int size = 0, unsigned int version = 0, const QString& modDate = "");
	File(QString& pathName, unsigned int size = 0, unsigned int version = 0);
	~File();

	QString getName() const { return name; }
	QString getPath() const { return path; }
	QString getFullPath() const { return path + "/" + name; }
	QDateTime getModDate() const { return modDate; }
	unsigned int getSize() const { return size; }
	unsigned int getVersion() const { return version; }

	void incrementVersion() { version++; }

	void setData(const QByteArray& _data);
	QByteArray& getData();

private:
	QString name;
	QString path;
	QDateTime modDate;
	unsigned int size;
	unsigned int version;
	QByteArray data;

};
}

#endif
